package com.lm.hutool.example;

import cn.hutool.crypto.SecureUtil;
import cn.hutool.crypto.symmetric.AES;

public class HutoolCryptoExample {
    public static void main(String[] args) {
        // MD5 加密
        String md5 = SecureUtil.md5("hello world");
        System.out.println("MD5 加密：" + md5);

        // AES 加密
        AES aes = SecureUtil.aes("1234567812345678".getBytes());
        String encrypted = aes.encryptHex("Hutool 加密示例");
        System.out.println("AES 加密：" + encrypted);
        System.out.println("AES 解密：" + aes.decryptStr(encrypted));
    }
}
